#include <QFont>

#include "gamesummarydialog.h"
#include "ui_gamesummarydialog.h"
#include "mainwindow.h"
#include "../GameEngine/engine.h"
#include "../GameEngine/statistics.h"

GameSummaryDialog::GameSummaryDialog(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::GameSummaryDialog)
{
    ui->setupUi(this);
}

GameSummaryDialog::~GameSummaryDialog()
{
    delete ui;
}

void GameSummaryDialog::DisplayStatistics()
{
    if(Engine::GameStatistics.WinningTeam == 1)
        ui->labelWinningTeam->setText("BLUE TEAM WON!");
    else
        ui->labelWinningTeam->setText("RED TEAM WON!");
}

void GameSummaryDialog::on_buttonClose_clicked()
{
    setHidden(true);
    ((MainWindow*)parent())->ShowMainMenu();
}
